-- 2022-8-1

---[[1
    function ReadAndWrite(file1,file2)
    if file1==nil then
        if(file2 == nil) then
            local temp = io.read()
            local filename = io.open("test.lua","w")
            io.output(filename)
            io.write(temp)
            io.close(filename)
            return
        end
    elseif file2==nil then
        if file1~=nil then
            local temp = io.read()
            local file = io.open(file1,"w")
            io.output(file)
            io.write(temp)
            io.close(file)
            return
        end
    else
        f1 = assert(io.open(file1,"r"))
        io.input(f1)
        local temp = f1:read("a")
        f1:close()
        f2 = assert(io.open(file2,"w"))
        io.output(f2)
        io.write(temp)
        f2:close()
        return
    end
end
ReadAndWrite("test.lua","t.txt")
--]]